package team.knowers.qzhserver.user.user.entity.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import team.knowers.qzhserver.common.entity.BaseDO;

import java.io.Serial;
import java.util.Date;

/**
 * 用户配置信息
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(UserDOField.TABLE_NAME)
public class UserDO extends BaseDO {
    @Serial
    private static final long serialVersionUID = 1L;

    //用户id
    @TableId(value = UserDOField.ID, type = IdType.ASSIGN_ID)
    private String id;

    //用户名
    @TableField(value = UserDOField.USERNAME)
    private String username;

    //电话号码
    @TableField(value = UserDOField.TELEPHONE)
    private String telephone;

    //昵称
    @TableField(value = UserDOField.NICKNAME)
    private String nickName;

    //头像
    @TableField(value = UserDOField.AVATAR)
    private String avatar;

    //密码
    @TableField(value = UserDOField.PASSWORD)
    private String password;

    //用户信息创建时间
    @TableField(value = UserDOField.GMT_CREATE)
    private Date gmtCreate;

    //用户信息编辑时间
    @TableField(value = UserDOField.GMT_MODIFIED)
    private Date gmtModified;

    //用户权限，0为被封禁，1为正常
    @TableField(value = UserDOField.ROLE)
    private Integer role;
}
